<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>清理缓存</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/style/layout.css"/> 
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/style/content.css"/>
        <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
        <script type="text/javascript">
            function clearcache(temp){
                $("#loading").show();
                $.ajax({
                    type:"GET",
                    url:"<{:U('clearcache')}>",
                    data:"temp="+temp,
                    error:function(){
                        $("#msg").html('请求失败');
                    },
                    success:function(data){
                        $("#loading").hide();
                        if(data.status==1){
                            $("#msg").html('清理成功');
                        }else{
                            $("#msg").html('清理失败，请检查Runtime及其子目录权限。');
                        }
                    }
                })
            }
        </script>
    </head>
    <body>
        <div class="cbox col9 f_l">
            <div class="header"><h3>清理缓存</h3></div>
            <div class="content">
                <form action="<{:U('saveoptions')}>" method='POST'>
                <div class="innerbox">
                    <fieldset class='col9'>
                        <label>缓存列表</label>
                        <div>
                            <!--
                        <volist name="list" id="vo">
                            <input type="button" value="清理 <{$vo.description}>" onclick="clearcache('<{$vo.temp|rawurlencode}>')"/>
                        </volist>
                        <input type="button" value="清理 模板缓存" onclick="clearcache('<{:rawurlencode("Cache")}>')"/>
                        <input type="button" value="清理 字段、固化数据缓存" onclick="clearcache('<{:rawurlencode("Data")}>')"/>
                        <input type="button" value="清理 日志" onclick="clearcache('<{:rawurlencode("Logs")}>')"/>
                        <input type="button" value="清理 编译缓存" onclick="clearcache('<{:rawurlencode("~5icms_runtime.php")}>')"/>
                            -->
                        <input type="button" value="一键清理所有" onclick="clearcache('')"/>
                        </div>
                        <div id="msg" style="color:red;"></div>
                        <div class="f_c"></div>
                        <div style="width:190px;margin:20px auto;display:none;" id="loading"><img src="__PUBLIC__/Admin/style/images/loading.gif"/></div>
                    </fieldset>
                </div>
                </form>
                
            </div>
            
        </div>
        
    </body>
</html>
